package com.bclz.load;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class JDBCConnection {
		
	private static  class JDBCConnectionCreate{
		
		public static Connection con=null;
		static{
			try {
				Class.forName("com.mysql.jdbc.Driver");
				String url="jdbc:mysql://192.168.198.132/happy";
				String username="xuchang";
				String password="123456";
				con=DriverManager.getConnection(url, username, password);
			} catch (ClassNotFoundException | SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			
		}
		
		
	}
	
	public static Connection getConnection() {
		return JDBCConnectionCreate.con;
	}
	
}
